/*
 * @Author: TJN tjn@246@126.com
 * @Date: 2024-06-20 14:41:45
 * @LastEditors: TJN tjn@246@126.com
 * @LastEditTime: 2024-06-26 09:51:26
 * @FilePath: \hdcms-nest\src\main.ts
 * @Description:
 *
 * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved.
 */
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { ValidatePipeCustom } from './pipe/validate-pipe-custom';
import { NestExpressApplication } from '@nestjs/platform-express';

async function bootstrap() {
  const app = await NestFactory.create<NestExpressApplication>(AppModule);
  app.setGlobalPrefix('api');
  app.useGlobalPipes(new ValidatePipeCustom());
  app.useStaticAssets('uploads', { prefix: '/uploads' });
  await app.listen(3000);
}
bootstrap();
